using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing.Design;

namespace InterfaceToPropertyGrid
{
    class ShelfEditableProjection : IShelf
    {
        private IShelf _shelf;

        public ShelfEditableProjection(IShelf shelf)
        {
            this._shelf = shelf;
        }
        #region IShelf Members

        public string Model
        {
            get
            {
                //throw new Exception("The method or operation is not implemented.");
                return _shelf.Model;
            }
            set
            {
                //throw new Exception("The method or operation is not implemented.");
                _shelf.Model = value;
            }
        }

        public string Name
        {
            get
            {
                //throw new Exception("The method or operation is not implemented.");
                return _shelf.Name;
            }
            set
            {
                //throw new Exception("The method or operation is not implemented.");
                _shelf.Name = value;
            }
        }

        [TypeConverter(typeof(Dimension3DConverter))]
        [Category("Dimensions")]
        public Dimension3D Size
        {
            get
            {
                //throw new Exception("The method or operation is not implemented.");
                return _shelf.Size;
            }
            set
            {
                //throw new Exception("The method or operation is not implemented.");
                _shelf.Size = value;
            }
        }


        #endregion

        #region IBizBase Members

        [Category("Administrative")]
        [Editor(typeof(DateTimeEditor), typeof(UITypeEditor))]
        //Browsable(false)]
        public DateTime CreateDate
        {
            get
            {
                return _shelf.CreateDate;
                //throw new Exception("The method or operation is not implemented.");
            }
            set
            {
                _shelf.CreateDate = value;
                //throw new Exception("The method or operation is not implemented.");
            }
        }

        [Category("Administrative")]
        [Editor(typeof(TrackBarEditor), typeof(UITypeEditor))]
        //[Browsable(false)]
        public int PKId
        {
            get
            {
                return _shelf.PKId;
                //throw new Exception("The method or operation is not implemented.");
            }
            set
            {
                _shelf.PKId = value;
                //throw new Exception("The method or operation is not implemented.");
            }
        }

        #endregion


    }
}
